@extends('layouts.tankuang')

@section('content')
    <form name="add_form" id="add_form" action="{{url('admin/units/add_faren',$id)}}" method="post" enctype="multipart/form-data">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <div id="frdj">
            <h2 class="text-center mg_b36 mg_t25" style="font-weight: bold;">股东登记表</h2>
            <table class="table-form table-border w mg-auto">
                <tr>
                    <td class="font-bd" width="12%">单位</td>
                    <td><input type="text" class="form-input" value="{{getValue($id,'baoan_company','id','name')}}" name="unit_name"></td>
                    <td class="font-bd">姓名</td>
                    <td><input type="text" class="form-input" value="" name="name"></td>
                    <td class="font-bd">性别</td>
                    <td>
                        <select name="sex" class="w153 input_all">
                            <option value="男">男</option>
                            <option value="女">女</option>
                        </select>
                    </td>
                    <td rowspan="5" class="text-center">
                    	<div class="box_bt">
	                    	<span class="img_add"><img src="{{URL::asset('/')}}css/icons/edit_add.png">上传头像</span>
	                      	 <input class="box_file" type="file" name="pic">
	                    </div>
                    </td>
                </tr>
                <tr>
                    <td class="font-bd">出生年月</td>
                    <td>
                        <input class="easyui-datebox w153" value="" name="birthday">
                    </td>
                    <td class="font-bd">民族</td>
                    <td>
                        <select class="w153 input_all" name="nation">
                            <option value="">请选择</option>
                            @foreach($nation as $v)
                                <option value="{{$v->nation}}">{{$v->nation}}</option>
                            @endforeach
                        </select>
                    </td>
                    <td class="font-bd">籍贯</td>
                    <td>
                        <input type="text" class="form-input" value="" name="native_place">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd">文化程度</td>
                    <td>
                        <select class="w153 input_all" name="education">
                            <option value="">请选择</option>
                            <option value="博士">博士</option>
                            <option value="硕士">硕士</option>
                            <option value="本科">本科</option>
                            <option value="专科">专科</option>
                            <option value="中专">中专</option>
                            <option value="高中">高中</option>
                            <option value="初中">初中</option>
                            <option value="小学">小学</option>
                        </select>
                    </td>
                    <td class="font-bd">政治面貌</td>
                    <td>
                        <select class="w153 input_all" name="political_status">
                            <option value="">请选择</option>
                            <option value="中共党员">中共党员</option>
                            <option value="团员">团员</option>
                            <option value="民主党派">民主党派</option>
                            <option value="无">无</option>
                        </select>
                    </td>
                    <td class="font-bd">职务</td>
                    <td>
                        <input type="text" class="form-input" value="" name="position">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd">身份证号</td>
                    <td>
                        <input type="text" class="form-input" value="" name="id_number">
                    </td>
                    <td class="font-bd">出资金额</td>
                    <td>
                        <input type="text" class="form-input" value="" name="jine">
                    </td>
                    <td class="font-bd">出资比例</td>
                    <td>
                        <input type="text" class="form-input" value="" name="bili">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd">家庭住址</td>
                    <td>
                        <input type="text" class="form-input" value="" name="address">
                    </td>
                    <td class="font-bd">电子邮箱</td>
                    <td><input type="text" class="form-input" value="" name="email"></td>
                    <td class="font-bd">联系电话</td>
                    <td>
                        <input type="text" class="form-input" value="" name="phone">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd">备注</td>
                    <td colspan="7">
                        <textarea class="textarea" name="remark"></textarea>
                    </td>
                </tr>
            </table>
            {{--<div class="wbt mg_t25 mg_b18">
                <span class="font-bd">填报单位：</span>
                <input type="text" class="w250 input_bottom dsp" name="tbdw" value="{{$re->tbdw}}">
                <span class="itv"></span>
                <span class="font-bd">填报人：</span>
                <input type="text" class="w250 input_bottom dsp" name="tbr" value="{{$re->tbr}}">
            </div>--}}
            <div class="w wbt mg_t25 text-center">
                <button id="go" type="button" class="easyui-linkbutton dsp" data-options="iconCls:'icon-save'">确定</button>
                <button type="button" class="easyui-linkbutton dsp" data-options="iconCls:'icon-no'" onclick="$('#baoan').window('close')">关闭</button>
            </div>
        </div>
    </form>
    <script>
        $('#go').click(function (){
            var formData = new FormData($("#add_form")[0]);
            $.ajax({
                type: "POST",
                url: "{{url('admin/baoan/add_gudong',$id)}}",
                data: formData,
                async: false,
                cache: false,
                contentType: false,
                processData: false,
                /*error: function(data) {
                    $.messager.alert('信息提示',data.msg,'info');
                },*/
                success: function(data) {
                    $.messager.alert('信息提示',data.msg,'info');
                    $('#baoan').dialog('close');
                    $('.pagination-load').click();
                },
                error: function(msg) {
                    var json=JSON.parse(msg.responseText);
                    $.each(json, function(index, value) {
                        $.messager.alert('信息提示',value,'info');die;
                    });
                },
            });
        });
    </script>
@stop